<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
    <button onclick="history.back()">上一步</button>
    <button onclick="history.forward()">下一步</button>

    <button onclick="history.go(1)">下1步</button>
    <button onclick="history.go(-2)">上2步</button>


</body>

    <script>
        console.log(history.length);
    </script>
</html>